import React, { Suspense } from "react";
import { BrowserRouter, useRoutes } from "react-router-dom";
import { ROUTER_LIST } from "./router/routes";

const RouterView = () => useRoutes(ROUTER_LIST);

class App extends React.PureComponent {
  render() {
    return (
      <BrowserRouter>
        <Suspense fallback={<div>路由拼命加载中...</div>}>
          <RouterView></RouterView>
        </Suspense>
      </BrowserRouter>
    );
  }
}

export default App;
